package org.qydjk.common.pojo;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

@Entity
@Table(name = "qy_user_store_card_recharge_order", schema = "qydjk", catalog = "")
public class UserStoreCardRechargeOrder {
    private Integer id;
    private String userStoreCardRechargeOrderNo;
    private Integer userId;
    private Integer userStoreCardId;
    private String code;
    private BigDecimal rechargeMoney;
    private BigDecimal payMoney;
    private Integer process;
    private Date createTime;
    private Date updateTime;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "user_store_card_recharge_order_no")
    public String getUserStoreCardRechargeOrderNo() {
        return userStoreCardRechargeOrderNo;
    }

    public void setUserStoreCardRechargeOrderNo(String userStoreCardRechargeOrderNo) {
        this.userStoreCardRechargeOrderNo = userStoreCardRechargeOrderNo;
    }

    @Basic
    @Column(name = "user_id")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "user_store_card_id")
    public Integer getUserStoreCardId() {
        return userStoreCardId;
    }

    public void setUserStoreCardId(Integer userStoreCardId) {
        this.userStoreCardId = userStoreCardId;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "recharge_money")
    public BigDecimal getRechargeMoney() {
        return rechargeMoney;
    }

    public void setRechargeMoney(BigDecimal rechargeMoney) {
        this.rechargeMoney = rechargeMoney;
    }

    @Basic
    @Column(name = "pay_money")
    public BigDecimal getPayMoney() {
        return payMoney;
    }

    public void setPayMoney(BigDecimal payMoney) {
        this.payMoney = payMoney;
    }

    @Basic
    @Column(name = "process")
    public Integer getProcess() {
        return process;
    }

    public void setProcess(Integer process) {
        this.process = process;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserStoreCardRechargeOrder that = (UserStoreCardRechargeOrder) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (userStoreCardRechargeOrderNo != null ? !userStoreCardRechargeOrderNo.equals(that.userStoreCardRechargeOrderNo) : that.userStoreCardRechargeOrderNo != null)
            return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
        if (userStoreCardId != null ? !userStoreCardId.equals(that.userStoreCardId) : that.userStoreCardId != null)
            return false;
        if (code != null ? !code.equals(that.code) : that.code != null) return false;
        if (rechargeMoney != null ? !rechargeMoney.equals(that.rechargeMoney) : that.rechargeMoney != null)
            return false;
        if (payMoney != null ? !payMoney.equals(that.payMoney) : that.payMoney != null) return false;
        if (process != null ? !process.equals(that.process) : that.process != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (userStoreCardRechargeOrderNo != null ? userStoreCardRechargeOrderNo.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (userStoreCardId != null ? userStoreCardId.hashCode() : 0);
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (rechargeMoney != null ? rechargeMoney.hashCode() : 0);
        result = 31 * result + (payMoney != null ? payMoney.hashCode() : 0);
        result = 31 * result + (process != null ? process.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
